<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/purchaseinfo/supplier/q_supplier.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/purchaseinfo/supplier/q_supplier.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'Supplier_id',
                footer: "Foots",
                cnName: '供应商管理',
                name: 'supplier/q_supplier',
                url: "/q_supplier/",
                sortName: "CreateDate"
            });
            const editFormFields = ref({"Supcust_no":"","Supcust_flag":"","Sup_name":"","Sup_type":"","Sup_acct_back":"","Sup_acct_no":"","Sup_tax_no":"","Sup_addr":"","Sup_email":"","Check_out_flag":"","Check_out_date":"","Check_out_day":"","Credit_amt":"","Region_no":"","Zip":"","Sup_fax":"","Display_flag":"","Sup_man":"","Sup_tel":"","BL_number":"","Sale_man":"","BL_image":"","Remark":""});
            const editFormOptions = ref([[{"title":"供应商编号","field":"Supcust_no","disabled":true},
                               {"dataKey":"供货商状态","data":[],"title":"供应商标志","required":true,"field":"Supcust_flag","type":"select"},
                               {"title":"供应商名称","required":true,"field":"Sup_name"},
                               {"dataKey":"供应商类型","data":[],"title":"供应商类型","field":"Sup_type","type":"select"}],
                              [{"title":"开户银行","field":"Sup_acct_back","colSize":6},
                               {"title":"银行帐号","field":"Sup_acct_no"},
                               {"title":"税务登记号","field":"Sup_tax_no"}],
                              [{"title":"邮件地址","field":"Sup_email","colSize":6},
                               {"title":"地址","field":"Sup_addr","colSize":6}],
                              [{"dataKey":"结账类型","data":[],"title":"结帐类型","field":"Check_out_flag","type":"select"},
                               {"dataKey":"结账周期","data":[],"title":"结帐周期","field":"Check_out_day","type":"select"},
                               {"title":"结帐日期","field":"Check_out_date"},
                               {"title":"信誉额度","field":"Credit_amt","type":"decimal"}],
                              [{"dataKey":"往来标志","data":[],"title":"往来标志","field":"Display_flag","type":"select"},
                               {"title":"所属地区","field":"Region_no"},
                               {"title":"邮编","field":"Zip"},
                               {"title":"传真","field":"Sup_fax"}],
                              [{"title":"营业执照号码","field":"BL_number"},
                               {"title":"联系人","field":"Sup_man"},
                               {"title":"电话","field":"Sup_tel"},
                               {"title":"业务员","field":"Sale_man"}],
                              [{"title":"备注","field":"Remark","colSize":6,"type":"textarea"},
                               {"title":"营业执照图片","field":"BL_image","type":"img"}]]);
            const searchFormFields = ref({"Supcust_no":"","Supcust_flag":"","Sup_name":"","Region_no":"","Sup_type":"","Display_flag":"","Check_out_flag":"","Credit_amt":"","Sale_man":""});
            const searchFormOptions = ref([[{"title":"供应商编号","field":"Supcust_no","type":"like"},{"dataKey":"供货商状态","data":[],"title":"供应商标志","field":"Supcust_flag","type":"select"},{"title":"供应商名称","field":"Sup_name"},{"title":"所属地区","field":"Region_no"},{"dataKey":"供应商类型","data":[],"title":"供应商类型","field":"Sup_type","type":"select"}],[{"dataKey":"往来标志","data":[],"title":"往来标志","field":"Display_flag","type":"select"},{"dataKey":"结账类型","data":[],"title":"结帐类型","field":"Check_out_flag","type":"select"},{"title":"信誉额度","field":"Credit_amt","type":"decimal"},{"title":"业务员","field":"Sale_man"}]]);
            const columns = ref([{field:'Supplier_id',title:'ID',type:'guid',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'Supcust_no',title:'供应商编号',type:'string',width:220,readonly:true,align:'left',sort:true},
                       {field:'Supcust_flag',title:'供应商标志',type:'int',bind:{ key:'供货商状态',data:[]},width:100,require:true,align:'left'},
                       {field:'Sup_name',title:'供应商名称',type:'string',link:true,width:220,require:true,align:'left'},
                       {field:'Region_no',title:'所属地区',type:'string',width:140,align:'left'},
                       {field:'Sup_type',title:'供应商类型',type:'int',bind:{ key:'供应商类型',data:[]},width:100,align:'left'},
                       {field:'Sup_man',title:'联系人',type:'string',width:110,align:'left'},
                       {field:'Sup_addr',title:'地址',type:'string',width:250,align:'left'},
                       {field:'Zip',title:'邮编',type:'string',width:120,align:'left'},
                       {field:'Sup_email',title:'邮件地址',type:'string',width:250,align:'left'},
                       {field:'Sup_tel',title:'电话',type:'string',width:120,align:'left'},
                       {field:'Sup_fax',title:'传真',type:'string',width:120,align:'left'},
                       {field:'Sup_acct_back',title:'开户银行',type:'string',width:250,align:'left'},
                       {field:'Sup_acct_no',title:'银行帐号',type:'string',width:250,align:'left'},
                       {field:'Sup_tax_no',title:'税务登记号',type:'string',width:250,align:'left'},
                       {field:'BL_number',title:'营业执照号码',type:'string',width:200,align:'left'},
                       {field:'BL_image',title:'营业执照图片',type:'img',width:110,align:'left'},
                       {field:'Display_flag',title:'往来标志',type:'int',bind:{ key:'往来标志',data:[]},width:110,align:'left'},
                       {field:'Check_out_flag',title:'结帐类型',type:'int',bind:{ key:'结账类型',data:[]},width:110,align:'left'},
                       {field:'Check_out_date',title:'结帐日期',type:'datetime',width:150,align:'left',sort:true},
                       {field:'Check_out_day',title:'结帐周期',type:'int',bind:{ key:'结账周期',data:[]},width:110,align:'left'},
                       {field:'Credit_amt',title:'信誉额度',type:'decimal',width:110,align:'left'},
                       {field:'Sale_man',title:'业务员',type:'string',width:110,align:'left'},
                       {field:'AuditDate',title:'审核时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'AuditStatus',title:'审核状态',type:'int',width:80,align:'left'},
                       {field:'AuditID',title:'审核人员id',type:'int',width:80,align:'left'},
                       {field:'Auditor',title:'审核人员',type:'string',width:110,align:'left'},
                       {field:'CreateID',title:'创建人员id',type:'int',width:80,hidden:true,align:'left'},
                       {field:'Creator',title:'创建人员',type:'string',width:130,align:'left'},
                       {field:'CreateDate',title:'创建时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'ModifyID',title:'修改人员id',type:'int',width:80,hidden:true,align:'left'},
                       {field:'Modifyer',title:'修改人员',type:'string',width:110,align:'left'},
                       {field:'ModifyDate',title:'修改时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'Remark',title:'备注',type:'string',width:220,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
